<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class AppUserSign extends Model
{
    use HasFactory;

    protected $fillable = [
        'user_id','date',
    ];

    protected static function booted()
    {
        static::created(function ($model){
            User::find($model->user_id)->increment('sign_in');
        });
    }
}
